package com.hust.dao;

import java.util.ArrayList;
import java.util.List;

public class CommodityExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Long offset;

    public CommodityExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCIdIsNull() {
            addCriterion("c_id is null");
            return (Criteria) this;
        }

        public Criteria andCIdIsNotNull() {
            addCriterion("c_id is not null");
            return (Criteria) this;
        }

        public Criteria andCIdEqualTo(Long value) {
            addCriterion("c_id =", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdNotEqualTo(Long value) {
            addCriterion("c_id <>", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdGreaterThan(Long value) {
            addCriterion("c_id >", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdGreaterThanOrEqualTo(Long value) {
            addCriterion("c_id >=", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdLessThan(Long value) {
            addCriterion("c_id <", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdLessThanOrEqualTo(Long value) {
            addCriterion("c_id <=", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdIn(List<Long> values) {
            addCriterion("c_id in", values, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdNotIn(List<Long> values) {
            addCriterion("c_id not in", values, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdBetween(Long value1, Long value2) {
            addCriterion("c_id between", value1, value2, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdNotBetween(Long value1, Long value2) {
            addCriterion("c_id not between", value1, value2, "cId");
            return (Criteria) this;
        }

        public Criteria andCTitleIsNull() {
            addCriterion("c_title is null");
            return (Criteria) this;
        }

        public Criteria andCTitleIsNotNull() {
            addCriterion("c_title is not null");
            return (Criteria) this;
        }

        public Criteria andCTitleEqualTo(String value) {
            addCriterion("c_title =", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleNotEqualTo(String value) {
            addCriterion("c_title <>", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleGreaterThan(String value) {
            addCriterion("c_title >", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleGreaterThanOrEqualTo(String value) {
            addCriterion("c_title >=", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleLessThan(String value) {
            addCriterion("c_title <", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleLessThanOrEqualTo(String value) {
            addCriterion("c_title <=", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleLike(String value) {
            addCriterion("c_title like", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleNotLike(String value) {
            addCriterion("c_title not like", value, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleIn(List<String> values) {
            addCriterion("c_title in", values, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleNotIn(List<String> values) {
            addCriterion("c_title not in", values, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleBetween(String value1, String value2) {
            addCriterion("c_title between", value1, value2, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTitleNotBetween(String value1, String value2) {
            addCriterion("c_title not between", value1, value2, "cTitle");
            return (Criteria) this;
        }

        public Criteria andCTypeIsNull() {
            addCriterion("c_type is null");
            return (Criteria) this;
        }

        public Criteria andCTypeIsNotNull() {
            addCriterion("c_type is not null");
            return (Criteria) this;
        }

        public Criteria andCTypeEqualTo(String value) {
            addCriterion("c_type =", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeNotEqualTo(String value) {
            addCriterion("c_type <>", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeGreaterThan(String value) {
            addCriterion("c_type >", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeGreaterThanOrEqualTo(String value) {
            addCriterion("c_type >=", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeLessThan(String value) {
            addCriterion("c_type <", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeLessThanOrEqualTo(String value) {
            addCriterion("c_type <=", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeLike(String value) {
            addCriterion("c_type like", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeNotLike(String value) {
            addCriterion("c_type not like", value, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeIn(List<String> values) {
            addCriterion("c_type in", values, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeNotIn(List<String> values) {
            addCriterion("c_type not in", values, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeBetween(String value1, String value2) {
            addCriterion("c_type between", value1, value2, "cType");
            return (Criteria) this;
        }

        public Criteria andCTypeNotBetween(String value1, String value2) {
            addCriterion("c_type not between", value1, value2, "cType");
            return (Criteria) this;
        }

        public Criteria andCUrlIsNull() {
            addCriterion("c_url is null");
            return (Criteria) this;
        }

        public Criteria andCUrlIsNotNull() {
            addCriterion("c_url is not null");
            return (Criteria) this;
        }

        public Criteria andCUrlEqualTo(String value) {
            addCriterion("c_url =", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlNotEqualTo(String value) {
            addCriterion("c_url <>", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlGreaterThan(String value) {
            addCriterion("c_url >", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlGreaterThanOrEqualTo(String value) {
            addCriterion("c_url >=", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlLessThan(String value) {
            addCriterion("c_url <", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlLessThanOrEqualTo(String value) {
            addCriterion("c_url <=", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlLike(String value) {
            addCriterion("c_url like", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlNotLike(String value) {
            addCriterion("c_url not like", value, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlIn(List<String> values) {
            addCriterion("c_url in", values, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlNotIn(List<String> values) {
            addCriterion("c_url not in", values, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlBetween(String value1, String value2) {
            addCriterion("c_url between", value1, value2, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCUrlNotBetween(String value1, String value2) {
            addCriterion("c_url not between", value1, value2, "cUrl");
            return (Criteria) this;
        }

        public Criteria andCSalesIsNull() {
            addCriterion("c_sales is null");
            return (Criteria) this;
        }

        public Criteria andCSalesIsNotNull() {
            addCriterion("c_sales is not null");
            return (Criteria) this;
        }

        public Criteria andCSalesEqualTo(String value) {
            addCriterion("c_sales =", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesNotEqualTo(String value) {
            addCriterion("c_sales <>", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesGreaterThan(String value) {
            addCriterion("c_sales >", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesGreaterThanOrEqualTo(String value) {
            addCriterion("c_sales >=", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesLessThan(String value) {
            addCriterion("c_sales <", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesLessThanOrEqualTo(String value) {
            addCriterion("c_sales <=", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesLike(String value) {
            addCriterion("c_sales like", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesNotLike(String value) {
            addCriterion("c_sales not like", value, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesIn(List<String> values) {
            addCriterion("c_sales in", values, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesNotIn(List<String> values) {
            addCriterion("c_sales not in", values, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesBetween(String value1, String value2) {
            addCriterion("c_sales between", value1, value2, "cSales");
            return (Criteria) this;
        }

        public Criteria andCSalesNotBetween(String value1, String value2) {
            addCriterion("c_sales not between", value1, value2, "cSales");
            return (Criteria) this;
        }

        public Criteria andCLocationIsNull() {
            addCriterion("c_location is null");
            return (Criteria) this;
        }

        public Criteria andCLocationIsNotNull() {
            addCriterion("c_location is not null");
            return (Criteria) this;
        }

        public Criteria andCLocationEqualTo(String value) {
            addCriterion("c_location =", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationNotEqualTo(String value) {
            addCriterion("c_location <>", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationGreaterThan(String value) {
            addCriterion("c_location >", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationGreaterThanOrEqualTo(String value) {
            addCriterion("c_location >=", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationLessThan(String value) {
            addCriterion("c_location <", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationLessThanOrEqualTo(String value) {
            addCriterion("c_location <=", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationLike(String value) {
            addCriterion("c_location like", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationNotLike(String value) {
            addCriterion("c_location not like", value, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationIn(List<String> values) {
            addCriterion("c_location in", values, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationNotIn(List<String> values) {
            addCriterion("c_location not in", values, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationBetween(String value1, String value2) {
            addCriterion("c_location between", value1, value2, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCLocationNotBetween(String value1, String value2) {
            addCriterion("c_location not between", value1, value2, "cLocation");
            return (Criteria) this;
        }

        public Criteria andCImageIsNull() {
            addCriterion("c_image is null");
            return (Criteria) this;
        }

        public Criteria andCImageIsNotNull() {
            addCriterion("c_image is not null");
            return (Criteria) this;
        }

        public Criteria andCImageEqualTo(String value) {
            addCriterion("c_image =", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageNotEqualTo(String value) {
            addCriterion("c_image <>", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageGreaterThan(String value) {
            addCriterion("c_image >", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageGreaterThanOrEqualTo(String value) {
            addCriterion("c_image >=", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageLessThan(String value) {
            addCriterion("c_image <", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageLessThanOrEqualTo(String value) {
            addCriterion("c_image <=", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageLike(String value) {
            addCriterion("c_image like", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageNotLike(String value) {
            addCriterion("c_image not like", value, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageIn(List<String> values) {
            addCriterion("c_image in", values, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageNotIn(List<String> values) {
            addCriterion("c_image not in", values, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageBetween(String value1, String value2) {
            addCriterion("c_image between", value1, value2, "cImage");
            return (Criteria) this;
        }

        public Criteria andCImageNotBetween(String value1, String value2) {
            addCriterion("c_image not between", value1, value2, "cImage");
            return (Criteria) this;
        }

        public Criteria andHotIsNull() {
            addCriterion("hot is null");
            return (Criteria) this;
        }

        public Criteria andHotIsNotNull() {
            addCriterion("hot is not null");
            return (Criteria) this;
        }

        public Criteria andHotEqualTo(Integer value) {
            addCriterion("hot =", value, "hot");
            return (Criteria) this;
        }

        public Criteria andHotNotEqualTo(Integer value) {
            addCriterion("hot <>", value, "hot");
            return (Criteria) this;
        }

        public Criteria andHotGreaterThan(Integer value) {
            addCriterion("hot >", value, "hot");
            return (Criteria) this;
        }

        public Criteria andHotGreaterThanOrEqualTo(Integer value) {
            addCriterion("hot >=", value, "hot");
            return (Criteria) this;
        }

        public Criteria andHotLessThan(Integer value) {
            addCriterion("hot <", value, "hot");
            return (Criteria) this;
        }

        public Criteria andHotLessThanOrEqualTo(Integer value) {
            addCriterion("hot <=", value, "hot");
            return (Criteria) this;
        }

        public Criteria andHotIn(List<Integer> values) {
            addCriterion("hot in", values, "hot");
            return (Criteria) this;
        }

        public Criteria andHotNotIn(List<Integer> values) {
            addCriterion("hot not in", values, "hot");
            return (Criteria) this;
        }

        public Criteria andHotBetween(Integer value1, Integer value2) {
            addCriterion("hot between", value1, value2, "hot");
            return (Criteria) this;
        }

        public Criteria andHotNotBetween(Integer value1, Integer value2) {
            addCriterion("hot not between", value1, value2, "hot");
            return (Criteria) this;
        }

        public Criteria andBk2IsNull() {
            addCriterion("bk2 is null");
            return (Criteria) this;
        }

        public Criteria andBk2IsNotNull() {
            addCriterion("bk2 is not null");
            return (Criteria) this;
        }

        public Criteria andBk2EqualTo(String value) {
            addCriterion("bk2 =", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2NotEqualTo(String value) {
            addCriterion("bk2 <>", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2GreaterThan(String value) {
            addCriterion("bk2 >", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2GreaterThanOrEqualTo(String value) {
            addCriterion("bk2 >=", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2LessThan(String value) {
            addCriterion("bk2 <", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2LessThanOrEqualTo(String value) {
            addCriterion("bk2 <=", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2Like(String value) {
            addCriterion("bk2 like", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2NotLike(String value) {
            addCriterion("bk2 not like", value, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2In(List<String> values) {
            addCriterion("bk2 in", values, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2NotIn(List<String> values) {
            addCriterion("bk2 not in", values, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2Between(String value1, String value2) {
            addCriterion("bk2 between", value1, value2, "bk2");
            return (Criteria) this;
        }

        public Criteria andBk2NotBetween(String value1, String value2) {
            addCriterion("bk2 not between", value1, value2, "bk2");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}